<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户信息列表</title>
    <link rel="shortcut icon"  href="images/favicon.ico"/>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="description" content="This is my page">
	<LINK href="<%=path %>/admin/css/admin.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=path %>/admin/js/myJs.js" charset=utf-8></script>
	<link href="<%=path %>/admin/css/myStyle.css" rel="stylesheet" type="text/css" />
	
	<script type="text/javascript" language="javascript">
		//发送请求，筛选结果
		function select(){
			var usersName=document.getElementById("usersName").value;
			var realName=document.getElementById("realName").value;
			var action="users_selectUsers.html?users.usersName="+usersName+"&users.realName="+realName+"&page.pageIndex=1&page.pageSize=15";
			window.location.href=action;
		}
	</script>
  </head>
  
  <body>
  <TABLE cellSpacing=0 cellPadding=0 width="95%" align=center >
  <TR height=20>
    <TD></TD></TR>
  <TR height=22>
    <TD style="PADDING-LEFT: 20px; FONT-WEIGHT: bold; COLOR: #ffffff" 
    align=middle background="<%=path %>/admin/images/title_bg2.jpg">用户列表</TD></TR>
  <TR bgColor=#ecf4fc height=12>
    <TD></TD></TR>
  <TR height=20>
    <TD></TD></TR></TABLE>
    
   <table id="table1" cellSpacing=0 cellPadding=0 width="95%" align=center class="tableborder" style="border-top: 0px; border-left:0;">
   <tr align="right"  style="border:0px;">
		<td colspan="9" style="border:0px;">
			
			筛选&nbsp;&nbsp;&nbsp;&nbsp;	
			帐户名：<input type="text" id="usersName" name="users.usersName" />
				姓名：<input type="text" id="realName" name="users.usersName" />
				<button  class="allDelete" onclick="select();">筛选</button>
			
		</td>
	</tr>	
   <tr align="center"  style="color:#0066CC;">
   
		<th>选择</th><th>帐户名</th><th>姓名</th><th>性别</th><th>联系电话</th><th>QQ号码</th><th>权限</th><th>操作</th>
	</tr>
	<s:iterator value="#attr.usersList" id="u">
   	<tr align="center">
		<td>
		<s:if test="#attr.u.usersType!='最高管理员'">
			<input type="checkbox" value="<s:property value="#u.usersId"/>" id="usersId" name="usersId" />
		</s:if>
		<s:if test="#attr.u.usersType=='最高管理员'">
		<input type="checkbox" value="<s:property value="#u.usersId"/>"  disabled="disabled" />
		</s:if>
		</td>
		<td><s:property value="#attr.u.usersName" /></td>
		<td><s:property value="#attr.u.realName" /></td>
		<td><s:property value="#attr.u.sex" /></td>
		<td><s:property value="#attr.u.phone" /></td>
		<td><s:property value="#attr.u.qq" /></td>
		<td><s:property value="#attr.u.usersType" /></td>
		<td>
		
		<s:if test="#attr.u.usersType!='最高管理员'">
		<a href="users_preUpdate.action?users.usersId=<s:property value="#attr.u.usersId" />">[详细]</a>
		&nbsp;&nbsp;
		<c:if test="${user.usersType eq '最高管理员' }">
		<a href="users_deleteUsers.action?users_usersId=<s:property value="#attr.u.usersId" />" onclick="return confirm('确认删除？');">[删除]</a>
		</c:if>
		</s:if>
		<s:if test="#attr.u.usersType=='最高管理员'">
		<a href="users_preUpdate.action?users.usersId=<s:property value="#attr.u.usersId" />">[详细]</a>&nbsp;&nbsp;
		<c:if test="${user.usersType eq '最高管理员' }">
		[删除]
		</c:if>
		</s:if>
		
		</td>
	</tr>
	</s:iterator>
	<tr align="center">
		<td><input type="checkbox" value="全选" id="selectAll" onclick="selectAll(this.checked,'usersId');" /></td>
		<td colspan="7" align="left">
			<button type="button" class="allDelete" onclick="deleteAll('users_deleteMore.html','usersId');">删除选中</button>
		</td>
	</tr>
	
	<tr align="center">
		<td colspan="8">
			<s:property value="#attr.link" escape="false" />
		</td>
	</tr>
	
  </table>


  </body>
</html>
